package com.lanou.pianke.admin.service.impl;

import com.lanou.pianke.articlecategory.entity.ACategory;
import com.lanou.pianke.admin.mapper.ArticleCategoryMapper;
import com.lanou.pianke.admin.service.ArticleCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleCategoryServiceImpl implements ArticleCategoryService {
    @Autowired
    private ArticleCategoryMapper articleCategoryMapper;

    @Override
    public List<ACategory> showAll() {
        return articleCategoryMapper.showAll();
    }

    @Override
    public void deleteCategory(Long acid) {
        articleCategoryMapper.deleteCategory(acid);
    }

    @Override
    public ACategory selectByAcid(Long acid) {
        return articleCategoryMapper.selectByAcid(acid);
    }

    @Override
    public void updateByAcid(ACategory articleCategory) {
        articleCategoryMapper.updateByAcid(articleCategory);
    }

    @Override
    public void addCategory(ACategory articleCategory) {
        articleCategoryMapper.addCategory(articleCategory);
    }
}
